<?php
/*
	一键注册
*/
defined('BY_JYA') or exit('error');
$member=array(
	'name'=>$_RQ['domain'],
	'password'=>$_RQ['api_userkey'],
	'api_userkey'=>$_RQ['api_userkey'],
);
$uid=pdo_getcolumn('core_users',array('name'=>$_RQ['domain']),'id');
if(!$uid){
	$uid=cfc('user')->create_user($member);
}
$item=pdo_get('core_accounts',array('uniacid'=>$uid),array('token','aeskey'));
$item['url']=SITEROOT.'api/index.php';
$item['domain']=$_SERVER['HTTP_HOST'];
$item['username']=$_RQ['domain'];
$item['api_userkey']=$_RQ['api_userkey'];
eci($item);